import request from '@/config/axios'

// 品质检查备忘录 VO
export interface InspectionMemoVO {
  id: number // 编号
  projectId: number // 项目编号
  inspectionDate: Date // 考核日期
  issues: string // 本月考核问题
  nextMonthTasks: string // 下月任务
  highlights: string // 本月项目亮点：
  otherNotes: string // 其他说明
}

// 品质检查备忘录 API
export const InspectionMemoApi = {
  // 查询品质检查备忘录分页
  getInspectionMemoPage: async (params: any) => {
    return await request.get({ url: `/project/inspection-memo/page`, params })
  },
  // 查询品质检查备忘录列表
  getPage: async (params: any) => {
    return await request.get({ url: `/project/project/inspection-memo/page`, params })
  },

  // 查询品质检查备忘录详情
  getInspectionMemo: async (id: number) => {
    return await request.get({ url: `/project/inspection-memo/get?id=` + id })
  },

  // 新增品质检查备忘录
  createInspectionMemo: async (data: InspectionMemoVO) => {
    return await request.post({ url: `/project/inspection-memo/create`, data })
  },

  // 修改品质检查备忘录
  updateInspectionMemo: async (data: InspectionMemoVO) => {
    return await request.put({ url: `/project/inspection-memo/update`, data })
  },

  // 删除品质检查备忘录
  deleteInspectionMemo: async (id: number) => {
    return await request.delete({ url: `/project/inspection-memo/delete?id=` + id })
  },

  // 导出品质检查备忘录 Excel
  exportInspectionMemo: async (params) => {
    return await request.download({ url: `/project/inspection-memo/export-excel`, params })
  },
}
